
from django.conf.urls import url
from . import views
# Django REST framework JWT提供了登录签发JWT的视图
from rest_framework_jwt.views import obtain_jwt_token

# from . import views
urlpatterns = [
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SMSCodeView.as_view()),   # 短信验证码
    url(r'^usernames/(?P<username>\w+)/count/$', views.UserNameView.as_view()),    #判断用户名是否重复
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileView.as_view()),   # 判断手机号是否重复
    url(r'^users/$', views.UserView.as_view()),     # 用户注册
    # url(r'^authorizations/$', obtain_jwt_token),  #登陆
    url(r'^authorizations/$', views.UserLoginView.as_view()),   #登陆

    url(r'^user/$', views.UserDetialView.as_view()),    #个人中心信息
    url(r'^email/$', views.UserEmailView.as_view()),    #保存发送邮件
    url(r'^emails/verification/$', views.UserEmailVerifyView.as_view()),        #验证邮件

]
